<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>内容管理</title>
	<jsp:include page="../../import.jsp" flush="true" />
	<script src="<%=path %>/resource/lib/ueditor/ueditor.config.js" charset="utf-8" type="text/javascript"></script>
	<script src="<%=path %>/resource/lib/ueditor/ueditor.all.min.js" charset="utf-8" type="text/javascript"></script>
	<!--建议手动加载语言，避免在IE下有时因为加载语言失败导致编辑器加载失败-->
	<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
	<script src="<%=path %>/resource/lib/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
            initForm();
            saveEvent();
		});
        //初始化表单
        function initForm(){
            $("#formSet1").ligerForm({
                validate: true
            });
        }
        function showImg(e){
			/* e.preventDefault();
			 var href = $(e.target).attr('href');
			 if(!href){
			 return;
			 }
			 if(SQ.regs.img.test(href)){
			 SQ.imgPreview(href);
			 } */
            e.preventDefault();
            var href = $(e.target).attr('src');
            if(!href){
                return;
            }
            if(SQ.regs.img.test(href)){
                var imgSrc = $(e.target).attr('src'),
                    imgTit = $(e.target).attr('title');
                window.__ImgSrc = imgSrc;
                window.__ImgTit = imgTit;
                window.open('<%=path%>/project/prjbscinfo/imgWinOpen.do', '', 'location=yes, width=800, height=600');
            }
        }
        //保存事件
        function saveEvent(){
            $("#saveBtn1").click(function(event) {
                var form = liger.get("formSet1");
                if (!form.valid()) {
                    top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO,SQ_type: "warning"});
                    return false; //验证不通过，不执行以下代码
                }
                var data = form.getData();
                var url = '<%=path%>/custpay/cmmCstProposal/modify.do';
                var wait_dialog;
                $.ajax({
                    type: 'post',
                    dataType:'json',
                    data:data,
                    url: url,
                    beforeSend: function(){
                        wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
                    },
                    success:function(msg){
                        wait_dialog.close();
                        if(msg.success == 1){
                            top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "success"});
                            var callback=GET_W2Wcallback();
                            callback();
                            Remove_navTab ();
                        }else{
                            top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
                        }
                    }
                });
            });
        }
	</script>
</head>
<body class="iframeBody">
<div class="Wrapper">
</div>
<div id="pageInTab" class="pageInTab">
	<form id="formSet1">
		<div class="fieldset1 tabel_col clearFix">
			<div class="fieldBox col_100_auto">
				<div class="label">反馈问题</div>
				<div class="field">
					<span >${cmmcstproposal.content}</span>
				</div>
			</div>
			<div class="fieldBox col_100_auto">
				<div class="label">处理状态</div>
				<div class="field">
					<select name="prpslSts" id="prpslSts" validate="{required:true,select:true}">
						<option value=" " >请选择</option>
						<option value="0" <c:if test="${cmmcstproposal.prpslSts == 0}">selected</c:if>>未处理</option>
						<option value="1" <c:if test="${cmmcstproposal.prpslSts == 1}">selected</c:if>>已处理</option>
					</select>
				</div>
			</div>
			<div class="fieldBox col_100_auto">
				<div class="label">处理结果</div>
				<div class="field">
					<input name="finResult" id="finResult" type="text" ligerui="width:700" class="ui-textbox" value="${cmmcstproposal.finResult}" validate="{required:true}">
				</div>
			</div>
			<div id="btnsBox" class="btnsBox">
				<input name="cmmcstproposalId" id="cmmcstproposalId" type="text" style="display: none;" value="${cmmcstproposal.id}"/>
				<span id="saveBtn1" class="sq-button sq-button-round">保存</span>
				<input type="reset" id="resetBtn" class="l-button l-button-reset Hide">
			</div>
		</div>
	</form>
	<div class="sqPanel">
		<div class="sqPanel_head inL">
			<span>反馈问题图片</span>
		</div>
		<table class="table_full tbl_1">
			<tbody>
			<tr>
				<c:forEach items="${fileList}" var="cstFile" varStatus="status">
				<c:if test="${status.index%4==0}">
			</tr>
			<tr>
				</c:if>
				<td>
					<h5>${cstFile.datNm}</h5>
					<div class="imgBox">
						<c:if test="${ empty cstFile.filePath}">
							<img src="${defImg}"  role="winOpen" title=""  onclick="showImg(event);">
						</c:if>
						<c:if test="${ not empty cstFile.filePath}">
							<img id="imgPath"  role="winOpen" title="${cstFile.fileNm}" src="${cstFile.filePath}" onclick="showImg(event);" href="${cstFile.filePath}">
						</c:if>
					</div>
					<div class="btns">
						                    <span class="sq-button sq-button-round co_normal" >
						                   <a   target="_blank"  href="<%=path%>/system/sysulfilesrec/downLoad.do?fileName=${cstFile.fileNm}&filePath=${cstFile.filePath}">下载</a>
					                   </span>
					</div>
				</td>
				</c:forEach>
			</tr>
			</tbody>
		</table>
	</div>
</div>
<div class="clearLine"></div>
</body>
</html>